<?php defined('InShopNC') or exit('Access Invalid!cyq199610'); ?>
<link href="<?php echo SHOP_TEMPLATES_URL; ?>/css/member.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/member.js"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ToolTip.js"></script>
<script>
    //sidebar-menu
    $(document).ready(function () {
        $.each($(".side-menu > a"), function () {
            $(this).click(function () {
                var ulNode = $(this).next("ul");
                if (ulNode.css('display') == 'block') {
                    $.cookie(COOKIE_PRE + 'Mmenu_' + $(this).attr('key'), 1);
                } else {
                    $.cookie(COOKIE_PRE + 'Mmenu_' + $(this).attr('key'), null);
                }
                ulNode.slideToggle();
                $(this).css("background-position").indexOf("-10px -200px") >= 0 ? $(this).css("background-position", '') : $(this).css("background-position", "-10px -200px");
            });
        });
        $.each($(".side-menu-quick > a"), function () {
            $(this).click(function () {
                var ulNode = $(this).next("ul");
                ulNode.slideToggle();
                $(this).css("background-position").indexOf("-10px -240px") >= 0 ? $(this).css("background-position", '') : $(this).css("background-position", "-10px -240px");
            });
        });
    });
</script>

<div class="left-layout">
    <div class="ncm-l-top">
        <h2><a href="index.php?act=member&op=home"
               title="<?php echo $lang['nc_user_center']; ?>"><?php echo $lang['nc_user_center']; ?></a></h2>
        <a href="<?php echo urlShop('member_information', 'member'); ?>" title="账户基本设置" class="set-btn"></a>
    </div>
    <div class="ncm-user-info">
        <div class="avatar"><img src="<?php echo getMemberAvatar($output['member_info']['member_avatar']); ?>">

            <div class="frame"></div>
            <?php if ($output['message_num'] > 0) { ?>
                <a href="index.php?act=member_message&op=message" class="new-message"
                   title="新消息"><?php echo $output['message_num']; ?></a>
            <?php } ?>
        </div>
        <div class="handle"><a href="index.php?act=member_information&op=avatar" title="修改头像"><i
                    class="icon-camera"></i>修改头像</a><a href="index.php?act=member_information&op=member" title="修改资料"><i
                    class="icon-pencil"></i>修改资料</a><a href="index.php?act=login&op=logout" title="安全退出"><i
                    class="icon-off"></i>安全退出</a></div>
        <div class="name"><?php echo $_SESSION['member_name']; ?></div>
<!--        <div class="name">江湖等级：--><?php //echo $_SESSION['memberLevels'][$_SESSION['member_level']]['level_name']; ?><!--</div>-->
    </div>
    <ul id="sidebarMenu" class="ncm-sidebar">
        <li class="side-menu"><a href="javascript:void(0)" key="trade">
                <h3>交易管理</h3>
            </a>
            <ul>
                <li <?php if ($_GET['act'] == 'member_order' && $_GET['isv'] == 0) { ?> class="selected"<?php } ?>><a
                        href="<?php echo urlShop('member_order', 'index'); ?>">实物交易订单</a></li>
                <li <?php echo $_GET['isv'] == 1 ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_order', 'index', array('isv' => 1)); ?>">虚拟兑码订单</a></li>
                <li <?php echo $_GET['act'] == 'member_favorites' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_favorites', 'fglist'); ?>">我的收藏</a></li>
                <li <?php echo $_GET['act'] == 'member_evaluate' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_evaluate', 'list'); ?>">交易评价/晒单</a></li>
                <li <?php echo $_GET['act'] == 'predeposit' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('predeposit', 'pd_log_list'); ?>">账户余额</a></li>
                <?php if (intval(C('points_isuse')) == 1) { ?>
                    <li <?php echo $_GET['act'] == 'member_points' || $_GET['act'] == 'member_pointorder' ? 'class="selected"' : ''; ?>>
                        <a href="<?php echo urlShop('member_points', 'index'); ?>">我的积分</a></li>
                <?php } ?>
                <?php if (intval(C('voucher_allow')) == 1) { ?>
                    <li <?php echo $_GET['act'] == 'member_voucher' ? 'class="selected"' : ''; ?>><a
                            href="<?php echo urlShop('member_voucher', 'index'); ?>">我的代金券</a></li>
                <?php } ?>
            </ul>
        </li>
        <li class="side-menu"><a href="javascript:void(0)" key="serv">
                <h3>客户服务</h3>
            </a>
            <ul>
                <li <?php echo $_GET['act'] == 'member_refund' || $_GET['act'] == 'member_return' ? 'class="selected"' : ''; ?>>
                    <a href="<?php echo urlShop('member_refund', 'index'); ?>">退款及退货</a></li>
                <li <?php echo $_GET['act'] == 'member_complain' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_complain', 'index'); ?>">交易投诉</a></li>
                <li <?php echo $_GET['act'] == 'member_consult' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_consult', 'my_consult'); ?>">商品咨询</a></li>
                <li <?php echo $_GET['act'] == 'member_inform' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_inform', 'index'); ?>">违规举报</a></li>
            </ul>
        </li>
        <li class="side-menu"><a href="javascript:void(0)" key="info">
                <h3>资料管理</h3>
            </a>
            <ul>
                <li <?php echo $_GET['act'] == 'member_information' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_information', 'member'); ?>">账户信息</a></li>
                <li <?php echo $_GET['act'] == 'member_security' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_security', 'index'); ?>">账户安全</a></li>
                <li <?php echo $_GET['act'] == 'member_address' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_address', 'address'); ?>">收货地址</a></li>
                <li <?php echo $_GET['act'] == 'member_message' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_message', 'message'); ?>">我的消息</a></li>
                <?php if (intval(C('cms_isuse')) == 1 && $_SESSION['member_level']>1) { ?>
                    <li <?php echo $_GET['act'] == 'member_article' ? 'class="selected"' : ''; ?>><a
                            href="<?php echo CMS_SITE_URL; ?>/index.php?act=member_article&op=article_list">我的找茶信息</a>
                    </li>
                <?php } ?>
                <?php if(SHOP_SHOW_ALL){?>
                <li <?php echo $_GET['act'] == 'member_snsfriend' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_snsfriend', 'find'); ?>">我的好友</a></li>
                <?php } ?>
                <li <?php echo $_GET['act'] == 'member_goodsbrowse' ? 'class="selected"' : ''; ?>><a
                        href="<?php echo urlShop('member_goodsbrowse', 'list'); ?>">我的足迹</a></li>
<!--                --><?php //if (C('qq_isuse') == 1) { ?>
<!--                    <li --><?php //echo $_GET['act'] == 'member_connect' ? 'class="selected"' : ''; ?><!--><a-->
<!--                            href="--><?php //echo urlShop('member_connect', 'qqbind'); ?><!--">第三方账号登录</a></li>-->
<!--                --><?php //} elseif (C('sina_isuse') == 1) { ?>
<!--                    <li --><?php //echo $_GET['act'] == 'member_connect' ? 'class="selected"' : ''; ?><!--><a-->
<!--                            href="--><?php //echo urlShop('member_connect', 'sinabind'); ?><!--">第三方账号登录</a></li>-->
<!--                --><?php //} ?>
                <?php if (C('share_qqweibo_isuse') == 1 || C('share_sinaweibo_isuse') == 1) { ?>
                    <li <?php echo $_GET['act'] == 'member_sharemanage' ? 'class="selected"' : ''; ?>><a
                            href="<?php echo urlShop('member_sharemanage', 'index'); ?>">分享绑定</a></li>
                <?php } ?>
            </ul>
        </li>
        <?php if (SHOP_SHOW_ALL) { ?>
            <li class="side-menu"><a href="javascript:void(0)" key="app">
                    <h3>应用管理</h3>
                </a>
                <ul>
                    <li <?php echo $_GET['act'] == 'member_snshome' ? 'class="selected"' : ''; ?>><a
                            href="<?php echo urlShop('member_snshome', 'index'); ?>">个人主页</a></li>
                    <?php if (intval(C('cms_isuse')) == 1) { ?>
                        <li <?php echo $_GET['act'] == 'member_article' ? 'class="selected"' : ''; ?>><a
                                href="<?php echo CMS_SITE_URL; ?>/index.php?act=member_article&op=article_list">我的CMS</a>
                        </li>
                    <?php } ?>
                    <?php if (intval(C('circle_isuse')) == 1) { ?>
                        <li <?php echo $_GET['act'] == 'p_center' ? 'class="selected"' : ''; ?>><a
                                href="<?php echo CIRCLE_SITE_URL; ?>/index.php?act=p_center&op=index">我的圈子</a></li>
                    <?php } ?>
                    <?php if (intval(C('microshop_isuse')) == 1) { ?>
                        <li <?php echo $_GET['act'] == 'home' ? 'class="selected"' : ''; ?>><a
                                href="<?php echo MICROSHOP_SITE_URL; ?>/index.php?act=home&op=index&member_id=709">我的微商城</a>
                        </li>
                    <?php } ?>
                </ul>
            </li>
        <?php } ?>
    </ul>
</div>